Implementing missing macros to openssl compatibility layer #10520
Implementing missing macros to openssl compatibility layer #10520Roy-Carter wants to merge 1 commit into
Conversation
|
Can one of the admins verify this patch? |
|
@julek-wolfssl second part of the functions i've implemented , split the PR's for clarity of checks . |
54ef2e4 to
413e8ac
Compare
|
@dgarske errors seemed related to master diff. both tests worked for me locally , I rebased , can we re-run workflow? |
413e8ac to
62138a2
Compare
|
@julek-wolfssl @dgarske I've rebased to master , seems related to new changes added . |
|
Jenkins okay to test |
There was a problem hiding this comment.
Pull request overview
This PR expands the OpenSSL compatibility layer with aliases and implementations for several missing APIs used during migration to wolfSSL.
Changes:
- Adds compatibility mappings for
SSL_set_ciphersuites,X509_add1_ext_i2d,sk_GENERAL_NAME_new_null, andEC_KEY_oct2key. - Implements
wolfSSL_X509_add1_ext_i2dandwolfSSL_EC_KEY_oct2key. - Adds unit tests covering the new compatibility APIs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
wolfssl/ssl.h |
Declares the new X509 extension helper. |
wolfssl/openssl/ssl.h |
Adds OpenSSL compatibility macros for SSL, X509, and GENERAL_NAME APIs. |
wolfssl/openssl/ec.h |
Declares and maps EC_KEY_oct2key. |
src/x509.c |
Implements wolfSSL_X509_add1_ext_i2d. |
src/pk_ec.c |
Implements wolfSSL_EC_KEY_oct2key. |
tests/api.c |
Adds API tests for the new compatibility additions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (flags != 0) { | ||
| WOLFSSL_MSG("X509V3_ADD_* flags not supported; using default behavior"); | ||
| } |
| ext = wolfSSL_X509V3_EXT_i2d(nid, crit, value); | ||
| if (ext == NULL) { | ||
| return WOLFSSL_FAILURE; | ||
| } | ||
|
|
||
| ret = wolfSSL_X509_add_ext(x, ext, -1); |
| ExpectIntEQ(wolfSSL_X509_add1_ext_i2d(x509, NID_subject_alt_name, gns, 0, | ||
| 0), WOLFSSL_SUCCESS); |
| ExpectNotNull(gn = GENERAL_NAME_new()); | ||
| ExpectIntEQ(sk_GENERAL_NAME_push(sk, gn), 1); | ||
| ExpectIntEQ(sk_GENERAL_NAME_num(sk), 1); |
julek-wolfssl
left a comment
There was a problem hiding this comment.
@Roy-Carter please address copilot review. Thanks.
Description
Implementing as part of migration to wolfssl
SSL_set_ciphersuites
X509_add1_ext_i2d
sk_GENERAL_NAME_new_null
EC_KEY_oct2key
Testing
unitests to each functionality added
Checklist